from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

import os

urlpatterns = patterns('',
    # Example:
    # (r'^ljangoo/', include('ljangoo.foo.urls')),
    (r'^$', 'ljango.helloworld.index'),

    (r'^release/$', 'ljango.patchrpt.views.getRelList'),
    (r'^release/(\d+)$', 'ljango.patchrpt.views.getPatchByRel'),

    (r'^patch/$', 'ljango.patchrpt.views.getRelList'),
    (r'^patch/(\d+)$', 'ljango.patchrpt.views.getPatchById'),
    (r'^patch/(\d+)/(\d+)$', 'ljango.patchrpt.views.getPatchTaskByStatus'),

    (r'^task/(\d+)$', 'ljango.patchrpt.views.getTaskById'),

    (r'^json/release/$', 'ljango.patchrpt.views.getRelListtoJSON'),
    (r'^json/release/(\d+)$', 'ljango.patchrpt.views.getRelListByReltoJSON'),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/(.*)', admin.site.root),

    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.join(os.path.dirname(__file__), 'static')}),
)
